Fix XCom key handling when keys contain special characters like /#56042
Closed
Brunda10 wants to merge 5 commits intoapache:mainfrom
Closed
Fix XCom key handling when keys contain special characters like /#56042Brunda10 wants to merge 5 commits intoapache:mainfrom
Brunda10 wants to merge 5 commits intoapache:mainfrom
Conversation
Member
pierrejeambrun
left a comment
There was a problem hiding this comment.
Just one nit but looks good to me.
We probably need a test for the public API too.
| schema: | ||
| type: 'null' | ||
| title: Response Delete Task Instance | ||
| schema: {} |
Member
There was a problem hiding this comment.
I'm not sure to understand why this was updated.
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Contributor
|
Since this PR has become stale, I would like to help pick it up and get it merged. |
Member
|
Closing this one in favour of #58344 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes : #55410
Summary
This PR fixes an issue where XCom keys containing special characters (for example /) would break API calls and cause 404 Not Found errors.
The problem happened because keys were passed directly in the URL without encoding, so FastAPI treated / as a path separator.
Changes Made
SDK (client.py, taskrunner.py)
APIs (core_api/routes/public/xcoms.py, execution_api/routes/xcoms.py)
This PR ensures:
Keys are always quoted when sent (safe for URLs).
Keys are always unquoted when received (correct DB lookup).
Aligns XCom behavior across different access points (UI, API, execution API, and task runner).
Testing: